void __attribute__((naked,noinline)) sub_FFC5E380_my(){
asm volatile(
                 "LDR     R12, =0x201E\n"
                 "STMFD   SP!, {R4,LR}\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC5E440\n"
                 "BGT     loc_FFC5E3DC\n"
                 "LDR     R12, =0x2004\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC5E448\n"
                 "BGT     loc_FFC5E3C4\n"
                 "SUB     R12, R0, #0x1000\n"
                 "SUBS    R12, R12, #0xA9\n"
                 "SUBNE   R12, R0, #0x1000\n"
                 "SUBNES  R12, R12, #0xAD\n"
                 "SUBNE   R12, R0, #0x1000\n"
                 "SUBNES  R12, R12, #0xAF\n"
                 "BNE     loc_FFC5E458\n"
                 "B       loc_FFC5E440\n"
 "loc_FFC5E3C4:\n"
                 "SUB     R12, R0, #0x2000\n"
                 "SUBS    R12, R12, #5\n"
                 "SUBNE   R12, R0, #0x2000\n"
                 "SUBNES  R12, R12, #0x1D\n"
                 "BNE     loc_FFC5E458\n"
                 "B       loc_FFC5E440\n"
 "loc_FFC5E3DC:\n"
                 "LDR     R12, =0x5004\n"
                 "CMP     R0, R12\n"
                 "BEQ     loc_FFC5E440\n"
                 "BGT     loc_FFC5E408\n"
                 "SUB     R12, R0, #0x3000\n"
                 "SUBS    R12, R12, #0xA\n"
                 "BEQ     loc_FFC5E43C\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #1\n"
                 "BNE     loc_FFC5E458\n"
                 "B       loc_FFC5E440\n"
 "loc_FFC5E408:\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #6\n"
                 "BEQ     loc_FFC5E440\n"
                 "SUB     R12, R0, #0x5000\n"
                 "SUBS    R12, R12, #7\n"
                 "BNE     loc_FFC5E458\n"
                 "BL      sub_FFC1C7EC\n"
                 "LDR     R1, =0x59EC\n"
                 "LDR     R0, [R1,#0x10]\n"
                 "CMP     R0, #7\n"
                 "LDREQ   R0, [R1,#0x18]\n"
                 "BLEQ    sub_FFC5EBE0\n"
                 "B       loc_FFC5E450\n"
 "loc_FFC5E43C:\n"
                 "BL      sub_FFC1BDA4\n"
 "loc_FFC5E440:\n"
                 "LDMFD   SP!, {R4,LR}\n"
                 "B       sub_FFC5E1E0_my\n" //------------->
 "loc_FFC5E448:\n"
                 "BL      sub_FFC5D208\n"
                 "BL      sub_FFC5DC74\n"
 "loc_FFC5E450:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4,PC}\n"
 "loc_FFC5E458:\n"
                 "MOV     R0, #1\n"
                 "LDMFD   SP!, {R4,PC}\n"
 );
}






void __attribute__((naked,noinline)) sub_FFC5E1E0_my(){
asm volatile(
                 "STMFD   SP!, {R4-R6,LR}\n"
                 "BL      sub_FFC5EDD0\n"
                 "CMP     R0, #1\n"
                 "BLEQ    sub_FFC5EE5C\n"
                 "LDR     R4, =0x59EC\n"
                 "MOV     R5, #1\n"
                 "LDR     R0, [R4,#0x24]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R0, [R4,#0x4C]\n"
                 "CMPNE   R0, #0\n"
                 "BEQ     loc_FFC5E24C\n"
                 "BL      sub_FFC5EDD0\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC5E24C\n"
                 "BL      sub_FFC5EE5C\n"
                 "LDR     R0, [R4,#0x78]\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC5E24C\n"
                 "LDR     R1, =0xFFC5E360\n"
                 "MOV     R0, #0x20\n"
                 "BL      sub_FFC57EC4\n"
                 "BL      sub_FFD621F8\n"
                 "BL      sub_FFD62184\n"
                 "MOV     R1, #0\n"
                 "MOV     R0, #0x51\n"
                 "BL      sub_FFC661AC\n"
                 "STR     R5, [R4,#0x78]\n"
 "loc_FFC5E24C:\n"
                 "BL      sub_FFC5EDD0\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC5E298\n"
                 "LDR     R0, [R4,#0x44]\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC5E298\n"
                 "LDR     R0, [R4,#0x74]\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC5E298\n"
                 "LDR     R1, =0xFFC5E374\n"
                 "MOV     R0, #0x20\n"
                 "BL      sub_FFC57EC4\n"
                 "MOV     R1, #0\n"
                 "MOV     R0, #0x8C\n"
                 "BL      sub_FFC661AC\n"
                 "BL      sub_FFC64550\n"
                 "MOV     R0, #0x21\n"
                 "BL      sub_FFC661EC\n"
                 "STR     R5, [R4,#0x74]\n"
 "loc_FFC5E298:\n"
                 "LDR     R0, [R4,#0x38]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R0, [R4,#0x3C]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x44]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x48]\n"
                 "CMPNE   R0, #0\n"
                 "LDRNE   R0, [R4,#0x1C]\n"
                 "LDRNE   R1, [R4,#0x20]\n"
                 "ORRNES  R0, R0, R1\n"
                 "BEQ     loc_FFC5E2D4\n"
                 "BL      sub_FFC5DB14\n"
                 "BL      sub_FFC5DC74\n"
                 "B       loc_FFC5E2FC\n"
 "loc_FFC5E2D4:\n"
                 "LDR     R0, [R4,#0x58]\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC5E304\n"
                 "BL      sub_FFC5DB5C\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC5E304\n"
                 "BL      sub_FFC6039C\n"
                 "BL      sub_FFC60358\n"
                 "BL      sub_FFC15EF0\n"
                 "BL      sub_FFC5D664\n"
 "loc_FFC5E2FC:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
 "loc_FFC5E304:\n"
                 "BL      sub_FFC5DB5C\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC5E32C\n"
                 "LDR     R0, [R4,#0x7C]\n"
                 "CMP     R0, #0\n"
                 "BLEQ    sub_FFC5EEA0_my\n" //------------->
                 "MOV     R0, #0\n"
                 "STR     R0, [R4,#0x70]\n"
                 "STR     R0, [R4,#0x74]\n"
                 "STR     R0, [R4,#0x78]\n"
 "loc_FFC5E32C:\n"
                 "MOV     R0, #1\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
);
}






void __attribute__((naked,noinline)) sub_FFC5EEA0_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC5EF48\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC57EC4\n"
                "BL      sub_FFC1BFB8\n"
                "BL      sub_FFC5F208\n"
                "BL      sub_FFC6226C_my\n" //------------->
                "MOV     R0, #1\n"
                "BL      sub_FFC5D5B0\n"
                "BL      sub_FFC5DA98\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC5DD0C\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC6226C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R1, =0xFFC62460\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC57EC4\n"
                "LDR     R4, =0x5C6C\n"
                "MOV     R0, #6\n"
                "MOV     R5, #1\n"
                "STR     R0, [R4,#0x5C]\n"
                "STR     R5, [R4,#0x10]\n"
                "BL      sub_FFD1DE70\n"
                "BL      sub_FFD2CECC\n"
                "BL      sub_FFD2472C\n"
                "BL      sub_FFD22580\n"
                "BL      sub_FFC627E4_my\n"  //------------->
                "BL      sub_FFD2D800\n"
                "BL      sub_FFD2CD74\n"
                "MOV     R0, #1\n"
                "STR     R5, [R4,#0x18]\n"
                "BL      sub_FFC628BC\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x68]\n"
                "LDR     R1, [R4,#0x6C]\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC627E4_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "MOV     R0, #1\n"
                "BL      sub_FFD25000\n"
                "LDR     R0, =0x855\n"
                "BL      sub_FFD19A30\n"
                "BL      sub_FFC1BDA4\n"
                "BL      sub_FFC62044_my\n"  //-------------->
                "BL      sub_FFD1D768\n"
                "BL      sub_FFD178B0\n"
                "BL      sub_FFD25434\n"
                "BL      sub_FFD25A10\n"
                "BL      sub_FFD25C00\n"
                "BL      sub_FFD2D25C\n"
                "BL      sub_FFD2CA4C\n"
                "BL      sub_FFD2560C\n"
                "BL      sub_FFD2C498\n"
                "BL      sub_FFD24E60\n"
                "BL      sub_FFD2BCD0\n"
                "BL      sub_FFD2333C\n"
                "BL      sub_FFC66320\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC65FE8\n"
 );
} 




// branches are together

void __attribute__((naked,noinline)) sub_FFC62044_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R0, =0x5CDC\n"
                "LDR     R1, =sub_FFC61E1C_my\n" //------------->
                "BL      sub_FFC67B64\n"
                "LDR     R1, =0x5C6C\n"
                "LDR     R0, =sub_FFC61F54_my\n" //------------->
                "STR     R0, [R1,#0x6C]\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 



//branch 1

void __attribute__((naked,noinline)) sub_FFC61E1C_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R5,LR}\n"
                "BL      sub_FFD16674\n"
                "LDR     R4, =0x5C6C\n"
                "LDR     R0, [R4,#0x30]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC61E54\n"
                "LDR     R1, =0xFFC61F34\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC57EC4\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x30]\n"
                "STR     R0, [R4,#0x2C]\n"
                "BL      sub_FFC61D38\n"
                "LDMFD   SP!, {R3-R5,PC}\n"
"loc_FFC61E54:\n"
                "BL      sub_FFC16684\n"
                "LDRH    R0, [R4,#4]\n"
                "SUB     R12, R0, #0x8200\n"
                "SUBS    R12, R12, #0xA\n"
                "BNE     loc_FFC61E78\n"
                "MOV     R0, #0x24\n"
                "BL      sub_FFC661EC\n"
                "MOV     R0, #0x25\n"
                "BL      sub_FFC661EC\n"
"loc_FFC61E78:\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, SP\n"
                "STRH    R0, [SP]\n"
                "LDR     R0, [R4,#0x5C]\n"
                "STRH    R0, [SP,#2]\n"
                "MOV     R0, #0x40\n"
                "BL      sub_FFC661AC\n"
                "LDR     R0, [R4,#0x1C]\n"
                "CMP     R0, #0\n"
                "LDREQH  R0, [R4,#4]\n"
                "BLEQ    sub_FFC5C900\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, #1\n"
                "BL      sub_FFC61244_my\n" //----------->
                "LDR     R0, [R4,#0x68]\n"
                "BL      sub_FFC628BC\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x68]\n"
                "LDR     R1, [R4,#0x6C]\n"
                "ADD     SP, SP, #4\n"
                "LDMFD   SP!, {R4,R5,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 




//branch 2

void __attribute__((naked,noinline)) sub_FFC61F54_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R4, =0x5C6C\n"
                "LDRH    R0, [R4,#4]\n"
                "BL      sub_FFD24964\n"
                "BL      sub_FFD22768\n"
                "BL      sub_FFD25688\n"
                "BL      sub_FFD25C80\n"
             // "BL      nullsub_70\n"
                "BL      sub_FFD25048\n"
                "MOV     R5, #0\n"
                "MOV     R0, R5\n"
                "STR     R5, [R4,#0x24]\n"
                "BL      sub_FFC1676C\n"
             // "BL      nullsub_76\n"
                "STR     R5, [R4,#0x3C]\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC61244_my\n" //----------->
                "BL      sub_FFC64550\n"
                "LDR     R0, [R4,#0x60]\n"
                "CMP     R0, #0\n"
                "STRNE   R5, [R4,#0x60]\n"
                "BLNE    sub_FFC6241C\n"
                "BL      sub_FFD23410\n"
                "LDR     R1, [R4,#0x5C]\n"
                "MOV     R0, #0x41\n"
                "BL      sub_FFC661AC\n"
                "BL      sub_FFC6241C\n"
                "BL      sub_FFD22728\n"
                "BL      sub_FFD1DFE4\n"
                "CMP     R0, #0\n"
                "BLEQ    sub_FFD2276C\n"
                "BL      sub_FFD248EC\n"
                "BL      sub_FFD164E4\n"
                "BL      sub_FFC5AC2C\n"
                "STR     R0, [R4,#0x58]\n"
                "LDR     R0, =0x8003\n"
                "STR     R5, [R4,#0x2C]\n"
                "BL      sub_FFC5CA44\n"
                "STRH    R0, [R4]\n"
                "LDR     R0, =0x313D\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC5B69C\n"
                "BL      sub_FFC62760\n"
                "LDR     R0, [R4,#0x30]\n"
                "CMP     R0, #1\n"
                "STREQ   R5, [R4,#0x30]\n"
                "LDMEQFD SP!, {R4-R6,LR}\n"
                "BEQ     sub_FFC61D38\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 




//branches are joining here

void __attribute__((naked,noinline)) sub_FFC61244_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "MOV     R5, R0\n"
                "MOV     R4, R1\n"
                "LDR     R1, =0xFFC6143C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "LDR     R6, =0x5C6C\n"
                "LDR     R0, [R6,#0x10]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC613FC\n"
                "LDR     R0, [R6,#0x18]\n"
                "LDR     R1, =0x820A\n"
                "LDR     R2, =0xFFC61458\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC612C4\n"
                "CMP     R4, #1\n"
                "LDMEQFD SP!, {R4-R6,PC}\n"
                "CMP     R4, #0\n"
                "BNE     loc_FFC612C4\n"
                "CMP     R5, R1\n"
                "BNE     loc_FFC612A4\n"
                "BL      sub_FFC627E0\n"
                "BL      sub_FFC62480\n"
                "B       loc_FFC613FC\n"
"loc_FFC612A4:\n"
                "CMP     R2, R5,LSL#17\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC612B8\n"
                "BL      sub_FFC62528_my\n" //------------->
                "B       loc_FFC612BC\n"
"loc_FFC612B8:\n"
                "BL      sub_FFC624DC\n"
"loc_FFC612BC:\n"
                "BL      sub_FFC627E0\n"
                "B       loc_FFC613FC\n"
"loc_FFC612C4:\n"
                "CMP     R5, R1\n"
                "BNE     loc_FFC61318\n"
                "LDRH    R0, [R6,#2]\n"
                "CMP     R0, R1\n"
                "BEQ     loc_FFC613F4\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC612FC\n"
                "LDR     R1, =0xFFC6145C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC613CC\n"
                "B       loc_FFC61310\n"
"loc_FFC612FC:\n"
                "LDR     R1, =0xFFC6146C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC613E8\n"
"loc_FFC61310:\n"
                "BL      sub_FFC62480\n"
                "B       loc_FFC613F4\n"
"loc_FFC61318:\n"
                "CMP     R2, R5,LSL#17\n"
                "LDRH    R0, [R6,#2]\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC61388\n"
                "CMP     R0, R1\n"
                "BNE     loc_FFC61348\n"
                "LDR     R1, =0xFFC6147C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC613A4\n"
                "B       loc_FFC61380\n"
"loc_FFC61348:\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC6136C\n"
                "LDR     R1, =0xFFC6148C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC613CC\n"
                "B       loc_FFC61380\n"
"loc_FFC6136C:\n"
                "LDR     R1, =0xFFC6149C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC613E8\n"
"loc_FFC61380:\n"
                "BL      sub_FFC62528_my\n"  //-------------->
                "B       loc_FFC613F4\n"
"loc_FFC61388:\n"
                "CMP     R0, R1\n"
                "BNE     loc_FFC613AC\n"
                "LDR     R1, =0xFFC614AC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC613F0\n"
"loc_FFC613A4:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC624B0\n"
"loc_FFC613AC:\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC613D4\n"
                "LDR     R1, =0xFFC614BC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC613F0\n"
"loc_FFC613CC:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC62554\n"
"loc_FFC613D4:\n"
                "LDR     R1, =0xFFC614CC\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC613F0\n"
"loc_FFC613E8:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC62504\n"
"loc_FFC613F0:\n"
                "BL      sub_FFC624DC\n"
"loc_FFC613F4:\n"
                "CMP     R4, #0\n"
                "LDMNEFD SP!, {R4-R6,PC}\n"
"loc_FFC613FC:\n"
                "STRH    R5, [R6,#2]\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 






void __attribute__((naked,noinline)) sub_FFC62528_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC62740\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC57EC4\n"
                "LDR     R0, =0x5C6C\n"
                "LDR     R0, [R0,#0x28]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC63060\n"
                "LDMFD   SP!, {R4,LR}\n"
                "MOV     R0, #0\n"
                "B       sub_FFC65380_my\n"  //----------->
 );
} 





void __attribute__((naked,noinline)) sub_FFC65380_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R4, =0x5E18\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x30]\n"
                "LDR     R0, [R4,#8]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC653AC\n"
                "LDR     R0, =sub_FFC64F8C_my\n" //----------->
                "MOV     R1, #0\n"
                "BL      sub_FFC5AEA0\n"
                "STR     R0, [R4,#8]\n"
"loc_FFC653AC:\n"
                "LDR     R0, [R4,#0xC]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC653C8\n"
                "LDR     R0, =0xFFC64C2C\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC62194\n"
                "STR     R0, [R4,#0xC]\n"
"loc_FFC653C8:\n"
                "BL      sub_FFC65B88\n"
                "BL      sub_FFC64C90\n"
                "BL      sub_FFD2C228\n"
                "BL      sub_FFD2DF94\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD24154\n"
 );
} 






void __attribute__((naked,noinline)) sub_FFC64F8C_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R11,LR}\n"
                "LDR     R5, =0x5E18\n"
                "MOV     R4, R1\n"
                "LDR     R2, [R5,#0x2C]\n"
                "ADD     R0, R5, #0\n"
                "LDR     R0, [R0,#0x14]\n"
                "LDR     R9, =0x3007\n"
                "CMP     R2, #0\n"
                "MOV     R1, #0\n"
                "MOV     R11, R3\n"
                "MVN     R8, #0\n"
                "BEQ     loc_FFC65004\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC651F4\n"
                "CMP     R4, #0x800\n"
                "LDREQ   R2, [R5,#0x38]\n"
                "CMPEQ   R11, R2\n"
                "BNE     loc_FFC65304\n"
                "STR     R1, [R5,#0x2C]!\n"
                "CMP     R0, #0\n"
                "STR     R8, [R5,#0xC]\n"
                "BNE     loc_FFC65378\n"
                "BL      sub_FFC1C744\n"
                "CMP     R0, #1\n"
                "BEQ     loc_FFC64FFC\n"
                "BL      sub_FFC1C74C\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC65378\n"
"loc_FFC64FFC:\n"
                "BL      sub_FFC64DDC\n"
                "B       loc_FFC65378\n"
"loc_FFC65004:\n"
                "CMP     R0, #1\n"
                "SUBEQ   R12, R4, #0x2000\n"
                "SUBEQS  R12, R12, #0x1C\n"
                "BNE     loc_FFC65020\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC65684\n"
                "B       loc_FFC65378\n"
"loc_FFC65020:\n"
                "BL      sub_FFC70D30\n"
                "LDR     R10, =0x9A5\n"
                "CMP     R0, #1\n"
                "SUB     R6, R10, #4\n"
                "SUB     R7, R10, #2\n"
                "BNE     loc_FFC65054\n"
                "CMP     R4, R10\n"
                "CMPNE   R4, R6\n"
                "CMPNE   R4, R7\n"
                "BNE     loc_FFC65054\n"
                "BL      sub_FFC6FED4\n"
                "STR     R4, [R5,#0x3C]\n"
                "B       loc_FFC65304\n"
"loc_FFC65054:\n"
                "BL      sub_FFD22588\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC65074\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC5B3DC\n"
                "CMP     R0, #1\n"
                "CMPNE   R4, R10\n"
                "BEQ     loc_FFC65304\n"
"loc_FFC65074:\n"
                "BL      sub_FFC1C81C\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC6508C\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R7\n"
                "BEQ     loc_FFC65378\n"
"loc_FFC6508C:\n"
                "BL      sub_FFC6235C\n"
                "LDR     R1, =0x9A2\n"
                "CMP     R0, #1\n"
                "ADD     R2, R1, #2\n"
                "BNE     loc_FFC650B4\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R1\n"
                "CMPNE   R4, R7\n"
                "CMPNE   R4, R2\n"
                "BEQ     loc_FFC65378\n"
"loc_FFC650B4:\n"
                "LDR     R12, =0x200A\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC65368\n"
                "BGT     loc_FFC65130\n"
                "LDR     R12, =0x907\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #2\n"
                "MOVEQ   R0, R10\n"
                "BEQ     loc_FFC652A4\n"
                "BGT     loc_FFC6510C\n"
                "SUB     R12, R4, #0x800\n"
                "LDR     R6, =0x2003\n"
                "SUBS    R12, R12, #0x26\n"
                "BEQ     loc_FFC65208\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x29\n"
                "BEQ     loc_FFC6524C\n"
                "CMP     R4, #0x860\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x61\n"
                "BNE     loc_FFC6531C\n"
                "B       loc_FFC65304\n"
"loc_FFC6510C:\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6529C\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC65368\n"
                "CMP     R4, R7\n"
                "BEQ     loc_FFC6529C\n"
                "CMP     R4, R2\n"
                "BEQ     loc_FFC65368\n"
                "B       loc_FFC6531C\n"
"loc_FFC65130:\n"
                "LDR     R12, =0x3149\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #0\n"
                "MOVEQ   R0, #0x84\n"
                "BEQ     loc_FFC65314\n"
                "BGT     loc_FFC65188\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #0x20\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, #0x83\n"
                "BEQ     loc_FFC65314\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC651E0\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x35\n"
                "BEQ     loc_FFC651C4\n"
                "SUB     R12, R4, #0x3000\n"
                "SUBS    R12, R12, #0x148\n"
                "BNE     loc_FFC6531C\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x86\n"
                "B       loc_FFC65314\n"
"loc_FFC65188:\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC6530C\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #3\n"
                "BEQ     loc_FFC652C8\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #8\n"
                "BEQ     loc_FFC652AC\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #0xF\n"
                "BNE     loc_FFC6531C\n"
                "MOV     R0, #0x82\n"
                "BL      sub_FFC661EC\n"
                "B       loc_FFC65378\n"
"loc_FFC651C4:\n"
                "BL      sub_FFC65BBC\n"
                "CMP     R0, #4\n"
                "BEQ     loc_FFC65368\n"
                "LDR     R0, [R5,#0x1C]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC64D24\n"
                "B       loc_FFC65378\n"
"loc_FFC651E0:\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#0x1C]\n"
                "LDR     R0, [R5,#0x18]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC651FC\n"
"loc_FFC651F4:\n"
                "BL      sub_FFC64D24\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC651FC:\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC64EFC\n"
                "B       loc_FFC65378\n"
"loc_FFC65208:\n"
                "BL      sub_FFC6235C\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC65220\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC62350\n"
                "B       loc_FFC65378\n"
"loc_FFC65220:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORR     R0, R0, R1\n"
                "LDR     R1, [R5,#0x1C]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC65378\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4A82C\n"
                "BL      sub_FFD49F28\n"
                "B       loc_FFC65378\n"
"loc_FFC6524C:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC65378\n"
                "BL      sub_FFC62368\n"
                "CMP     R0, #0\n"
                "LDREQ   R0, [R5,#0x1C]\n"
                "CMPEQ   R0, #0\n"
                "BNE     loc_FFC65378\n"
                "BL      sub_FFC6235C\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC65378\n"
                "BL      sub_FFD2E03C\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC65378\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4A82C\n"
                "BL      sub_FFD173A8\n"
                "B       loc_FFC65378\n"
"loc_FFC6529C:\n"
                "MOV     R1, #1\n"
                "MOV     R0, R4\n"
"loc_FFC652A4:\n"
                "BL      sub_FFC64E38_my\n" //------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC652AC:\n"
                "MOV     R0, R11\n"
                "BL      sub_FFC60C94\n"
                "CMP     R0, #0\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, R4\n"
                "BLEQ    sub_FFC65828_my\n"  //----------->
                "B       loc_FFC65304\n"
"loc_FFC652C8:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMN     R0, #1\n"
                "BEQ     loc_FFC65304\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC6EF6C\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMP     R0, R6\n"
                "BNE     loc_FFC652F4\n"
                "BL      sub_FFC1C744\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC65300\n"
"loc_FFC652F4:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC5B650\n"
"loc_FFC65300:\n"
                "STR     R8, [R5,#0x3C]\n"
"loc_FFC65304:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC6530C:\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x85\n"
"loc_FFC65314:\n"
                "BL      sub_FFC661AC\n"
                "B       loc_FFC65378\n"
"loc_FFC6531C:\n"
                "LDR     R12, =0x855\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC65358\n"
                "BGT     loc_FFC65344\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x38\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x39\n"
                "BNE     loc_FFC65368\n"
                "B       loc_FFC65358\n"
"loc_FFC65344:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x56\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x5D\n"
                "BNE     loc_FFC65368\n"
"loc_FFC65358:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC65378\n"
"loc_FFC65368:\n"
                "MOV     R1, R11\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC65828_my\n"  //----------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC65378:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
 );
} 






void __attribute__((naked,noinline)) sub_FFC64E38_my(){
asm volatile(
                 "STMFD   SP!, {R4-R6,LR}\n"
                 "MOV     R4, R0\n"
                 "LDR     R0, =0x5E18\n"
                 "MOV     R5, R1\n"
                 "LDR     R0, [R0,#0x1C]\n"
                 "CMP     R0, #0\n"
                 "LDRNE   R1, =0xFFC64F68\n"
                 "BNE     loc_FFC64EE4\n"
                 "BL      sub_FFC65BC8\n"
                 "CMP     R0, #1\n"
                 "BNE     loc_FFC64E74\n"
 "loc_FFC64E64:\n"
                 "MOV     R0, R4\n"
                 "LDMFD   SP!, {R4-R6,LR}\n"
                 "MOV     R1, #0\n"
                 "B       sub_FFC65828_my\n" //------------->
 "loc_FFC64E74:\n"
                 "CMP     R5, #2\n"
                 "BNE     loc_FFC64E8C\n"
                 "BL      sub_FFC64550\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FFC64ED4\n"
                 "B       loc_FFC64EA0\n"
 "loc_FFC64E8C:\n"
                 "CMP     R5, #1\n"
                 "BNE     loc_FFC64ED4\n"
                 "BL      sub_FFC64568\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC64ED4\n"
 "loc_FFC64EA0:\n"
                 "MOV     R0, #0\n"
                 "BL      sub_FFC6EF6C\n"
                 "SUB     R12, R4, #0x900\n"
                 "SUBS    R12, R12, #0xA1\n"
                 "SUBNE   R12, R4, #0x900\n"
                 "SUBNES  R12, R12, #0xA3\n"
                 "SUBNE   R12, R4, #0x900\n"
                 "SUBNES  R12, R12, #0xA5\n"
                 "LDREQ   R0, =0xC507\n"
                 "MOVEQ   R1, #0\n"
                 "BLEQ    sub_FFC4A82C\n"
 "loc_FFC64ECC:\n"
                 "MOV     R0, #0\n"
                 "LDMFD   SP!, {R4-R6,PC}\n"
 "loc_FFC64ED4:\n"
                 "BL      sub_FFC64DDC\n"
                 "CMP     R0, #0\n"
                 "BNE     loc_FFC64EF0\n"
                 "LDR     R1, =0xFFC64F78\n"
 "loc_FFC64EE4:\n"
                 "MOV     R0, #0x60\n"
                 "BL      sub_FFC57EC4\n"
                 "B       loc_FFC64ECC\n"
 "loc_FFC64EF0:\n"
                 "MOV     R0, R5\n"
                 "BL      sub_FFD21504\n"
                 "B       loc_FFC64E64\n"
 );
}








void __attribute__((naked,noinline)) sub_FFC65828_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R7, R1\n"
                "MOV     R4, R0\n"
                "BL      sub_FFC65C44\n"
                "LDR     R5, =0x5E5C\n"
                "LDR     R3, =0x200A\n"
                "LDR     R12, [R5]\n"
                "LDR     R2, =0x4008\n"
                "LDR     R6, =0x9A3\n"
                "LDR     R0, =0x3007\n"
                "LDR     R1, =0x1051\n"
                "CMP     R12, #9\n"
                "ADD     LR, R3, #0x15\n"
                "ADDLS   PC, PC, R12,LSL#2\n"
                "B       loc_FFC65B80\n"
"loc_FFC65864:\n"
                "B       loc_FFC6588C\n"
"loc_FFC65868:\n"
                "B       loc_FFC6589C\n"
"loc_FFC6586C:\n"
                "B       loc_FFC658AC\n"
"loc_FFC65870:\n"
                "B       loc_FFC65920\n"
"loc_FFC65874:\n"
                "B       loc_FFC65960\n"
"loc_FFC65878:\n"
                "B       loc_FFC659E8\n"
"loc_FFC6587C:\n"
                "B       loc_FFC65A18\n"
"loc_FFC65880:\n"
                "B       loc_FFC65AC8\n"
"loc_FFC65884:\n"
                "B       loc_FFC65A28\n"
"loc_FFC65888:\n"
                "B       loc_FFC65AF0\n"
"loc_FFC6588C:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC657B0\n"
"loc_FFC6589C:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC65DC0_my\n"  //------------>
"loc_FFC658AC:\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC65910\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #6\n"
                "BEQ     loc_FFC658D4\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC65918\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC65B80\n"
"loc_FFC658D4:\n"
                "BL      sub_FFC64DB8\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC65C2C\n"
                "LDR     R0, [R5,#8]\n"
                "CMP     R0, #0\n"
                "MOVNE   R1, #0\n"
                "MOVNE   R0, R6\n"
                "BNE     loc_FFC65908\n"
                "LDR     R0, [R5,#4]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC65B30\n"
                "LDR     R0, =0x9A1\n"
                "MOV     R1, #0\n"
"loc_FFC65908:\n"
                "BL      sub_FFC657B0\n"
                "B       loc_FFC65B30\n"
"loc_FFC65910:\n"
                "BL      sub_FFC65D34\n"
                "B       loc_FFC65B30\n"
"loc_FFC65918:\n"
                "BL      sub_FFC65D4C\n"
                "B       loc_FFC65B30\n"
"loc_FFC65920:\n"
                "SUB     R12, R4, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC65950\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC65948\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC65958\n"
                "CMP     R4, R0\n"
                "BLEQ    sub_FFC65D4C\n"
                "B       loc_FFC65B80\n"
"loc_FFC65948:\n"
                "BL      sub_FFC65754_my\n"  //---------------->
                "B       loc_FFC65B80\n"
"loc_FFC65950:\n"
                "BL      sub_FFC65D14\n"
                "B       loc_FFC65B80\n"
"loc_FFC65958:\n"
                "BL      sub_FFC65D34\n"
                "B       loc_FFC65B80\n"
"loc_FFC65960:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC659BC\n"
                "BGT     loc_FFC65988\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC659A4\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC659D4\n"
"loc_FFC6597C:\n"
                "CMP     R4, R3\n"
                "BNE     loc_FFC65B80\n"
                "B       loc_FFC65998\n"
"loc_FFC65988:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC659C8\n"
"loc_FFC65990:\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC65B80\n"
"loc_FFC65998:\n"
                "BL      sub_FFC65D9C\n"
                "BL      sub_FFC65D14\n"
                "B       loc_FFC65B30\n"
"loc_FFC659A4:\n"
                "BL      sub_FFC18464\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC65C2C\n"
                "MOV     R0, #0\n"
                "STR     R0, [R5,#0xC]\n"
                "B       loc_FFC65B30\n"
"loc_FFC659BC:\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC65C2C\n"
                "B       loc_FFC65A0C\n"
"loc_FFC659C8:\n"
                "BL      sub_FFC18464\n"
                "BL      sub_FFC65D9C\n"
                "B       loc_FFC65AC0\n"
"loc_FFC659D4:\n"
                "BL      sub_FFC18464\n"
                "BL      sub_FFC65D9C\n"
                "B       loc_FFC65A20\n"
"loc_FFC659E0:\n"
                "BL      sub_FFC65C2C\n"
                "B       loc_FFC65B30\n"
"loc_FFC659E8:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC65A0C\n"
                "BGT     loc_FFC65A00\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC6597C\n"
                "B       loc_FFC65A20\n"
"loc_FFC65A00:\n"
                "CMP     R4, R0\n"
                "BNE     loc_FFC65990\n"
                "B       loc_FFC65AC0\n"
"loc_FFC65A0C:\n"
                "MOV     R0, R7\n"
                "BL      sub_FFC65D68\n"
                "B       loc_FFC65B30\n"
"loc_FFC65A18:\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC65B80\n"
"loc_FFC65A20:\n"
                "MOV     R0, #8\n"
                "B       loc_FFC659E0\n"
"loc_FFC65A28:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC65AC0\n"
                "BGT     loc_FFC65AAC\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC65910\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC65A0C\n"
                "B       loc_FFC65B80\n"
"loc_FFC65AAC:\n"
                "CMP     R4, R2\n"
                "SUBNE   R12, R4, #0x4000\n"
                "SUBNES  R12, R12, #0xE\n"
                "BEQ     loc_FFC65910\n"
                "B       loc_FFC65B80\n"
"loc_FFC65AC0:\n"
                "MOV     R0, #7\n"
                "B       loc_FFC659E0\n"
"loc_FFC65AC8:\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC65AE0\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC65A0C\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC65B80\n"
"loc_FFC65AE0:\n"
                "BL      sub_FFC65D14\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC64EFC\n"
                "B       loc_FFC65B30\n"
"loc_FFC65AF0:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC65B38\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC65B70\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC65B60\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x2A\n"
                "BNE     loc_FFC65B80\n"
                "BL      sub_FFC65CCC\n"
                "LDR     R0, [R5,#0x14]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC65B30\n"
                "BL      sub_FFC65CE8_my\n"  //---------------->
                "BL      sub_FFD22594\n"
"loc_FFC65B30:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC65B38:\n"
                "BL      sub_FFC65CCC\n"
                "LDR     R0, =0x8007\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC5CA38\n"
                "BL      sub_FFD214B8\n"
                "BL      sub_FFC65D14\n"
                "BL      sub_FFD22594\n"
                "BL      sub_FFC64DB8\n"
                "MOV     R0, #0\n"
                "B       loc_FFC659E0\n"
"loc_FFC65B60:\n"
                "BL      sub_FFC65CCC\n"
                "BL      sub_FFD214B8\n"
                "BL      sub_FFD22594\n"
                "B       loc_FFC65918\n"
"loc_FFC65B70:\n"
                "BL      sub_FFC65CCC\n"
                "BL      sub_FFD214B8\n"
                "BL      sub_FFD22594\n"
                "B       loc_FFC65910\n"
"loc_FFC65B80:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
                ".ltorg\n"  
 );
} 








void __attribute__((naked,noinline)) sub_FFC65DC0_my(){ 
 asm volatile(
                "LDR     R3, =0x5E5C\n"
                "LDR     R12, =0x2006\n"
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, [R3,#0xC]\n"
                "LDR     R2, [R3,#0x14]\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC65E34\n"
                "BGT     loc_FFC65E00\n"
                "SUB     R12, R0, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC65E58\n"
                "SUB     R12, R0, #0x1000\n"
                "SUBS    R12, R12, #0x51\n"
                "BNE     loc_FFC65E7C\n"
                "BL      sub_FFC65D34\n"
                "B       loc_FFC65E74\n"
"loc_FFC65E00:\n"
                "SUB     R12, R0, #0x3000\n"
                "SUBS    R12, R12, #7\n"
                "BEQ     loc_FFC65E70\n"
                "SUB     R12, R0, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC65E7C\n"
                "CMP     R2, #0\n"
                "BNE     loc_FFC65E74\n"
                "LDR     R0, [R3,#8]\n"
                "ORRS    R0, R0, R1\n"
                "BEQ     loc_FFC65E40\n"
                "BL      sub_FFC65754_my\n"  //------------>
                "B       loc_FFC65E74\n"
"loc_FFC65E34:\n"
                "CMP     R2, #0\n"
                "BLEQ    sub_FFC64588\n"
                "B       loc_FFC65E74\n"
"loc_FFC65E40:\n"
                "LDR     R0, [R3,#4]\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #3\n"
                "BNE     loc_FFC65E68\n"
                "BL      sub_FFC65D14\n"
                "B       loc_FFC65E74\n"
"loc_FFC65E58:\n"
                "CMP     R1, #0\n"
                "BNE     loc_FFC65E74\n"
                "BL      sub_FFC1806C\n"
                "MOV     R0, #2\n"
"loc_FFC65E68:\n"
                "BL      sub_FFC65C2C\n"
                "B       loc_FFC65E74\n"
"loc_FFC65E70:\n"
                "BL      sub_FFC65D4C\n"
"loc_FFC65E74:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4,PC}\n"
"loc_FFC65E7C:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC65754_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC65A48\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "LDR     R4, =0x5E5C\n"
                "LDR     R0, [R4,#0x10]\n"
                "CMP     R0, #0\n"
                "LDMEQFD SP!, {R4,LR}\n"
                "BEQ     sub_FFC65CE8_my\n"  //------------->
                "LDR     R1, =0xFFC65A64\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "BL      sub_FFD225C0\n"
                "LDR     R0, [R4,#0x18]\n"
                "CMP     R0, #1\n"
                "MOVNE   R0, #1\n"
                "STRNE   R0, [R4,#0x18]\n"
                "BLNE    sub_FFC5BF6C\n"
                "MOV     R0, #9\n"
                "BL      sub_FFC65C2C\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD21374\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC65CE8_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC65E9C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC57EC4\n"
                "LDR     R1, =0x5E5C\n"
                "MOV     R0, #0\n"
                "STR     R0, [R1,#0xC]\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC65C2C\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC65420_my\n" //------------->
 );
} 

void __attribute__((naked,noinline)) sub_FFC65420_my(){ 
 asm volatile(
                "LDR     R0, =0x5E18\n"
                "STMFD   SP!, {R3,LR}\n"
                "LDR     R1, [R0,#0x40]\n"
                "CMP     R1, #1\n"
                "MOVNE   R1, #1\n"
                "STRNE   R1, [R0,#0x40]\n"
                "BLNE    sub_FFC5BF6C\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x80\n"
                "BL      sub_FFC661AC\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0x6B\n"
                "BL      sub_FFC59C2C\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0xA3\n"
                "BL      sub_FFC59B24\n"
                "BL      sub_FFC4A918\n"
                "BL      sub_FFC647FC\n"
                "BL      sub_FFC1842C_my\n" //---------------->
                "BL      sub_FFC64D70\n"
                "LDMFD   SP!, {R12,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC1842C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "MOV     R4, R0\n"
                "MOV     R0, #0x20\n"
                "LDR     R1, =0xFFC18554\n"
                "BL      sub_FFC57EC4\n"
                "BL      sub_FFC189A8\n"
                "CMP     R0, #0\n"
                "LDMNEFD SP!, {R4,PC}\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC48200\n"
                "BL      sub_FFC4B9CC\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC4DB58_my\n" //----------------->
 );
} 








void __attribute__((naked,noinline)) sub_FFC4DB58_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R8, R0\n"
                "MOV     R0, #0x41\n"
                "SUB     SP, SP, #0x38\n"
                "MOV     R5, #0\n"
                "STR     R0, [SP,#0x34]\n"
                "BL      sub_FFC4DB28\n"
                "CMP     R0, #0\n"
                "LDRNE   R1, =0x13B\n"
                "BNE     loc_FFC4DD04\n"
                "LDR     R4, =0x56B8\n"
                "MOV     R1, #0x1E\n"
                "LDR     R0, [R4,#0xC]\n"
                "BL      sub_FFC18E20\n"
                "BL      sub_FFC59DBC\n"
                "STR     R0, [R4,#4]\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC55F0C\n"
                "STR     R0, [SP,#0x28]\n"
                "ADD     R0, SP, #0x28\n"
                "MOV     R1, SP\n"
                "BL      sub_FFC56058\n"
                "MOV     R0, SP\n"
                "BL      sub_FFC55F40\n"
                "STR     R0, [SP,#0x2C]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x34\n"
                "BL      sub_FFC5A0DC\n"
                "LDR     R7, [SP,#0x2C]\n"
                "BL      sub_FFC4E080\n"
                "MOV     R6, #0\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "STR     R6, [SP,#0x2C]\n"
                "STR     R6, [SP,#0x28]\n"
                "BL      sub_FFC21C3C\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x2F\n"
                "BL      sub_FFC5A0DC\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x2D\n"
                "BL      sub_FFC5A0DC\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC24B70\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x30\n"
                "BL      sub_FFC5A0DC\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC22400\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x2E\n"
                "BL      sub_FFC5A0DC\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0xB8\n"
                "BL      sub_FFC5A188\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x11D\n"
                "LDRNE   R0, =0xFFC4DF7C\n"
                "BLNE    sub_FFC0C098\n"
                "LDRH    R0, [SP,#0x2C]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x28\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #1\n"
                "STR     R0, [SP,#0x28]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R1, #0x92\n"
                "BL      sub_FFC5A0DC\n"
                "MOV     R2, #1\n"
                "ADD     R1, SP, #0x34\n"
                "MOV     R0, #0xFA\n"
                "BL      sub_FFC59C2C\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x152\n"
                "LDRNE   R0, =0xFFC4DF7C\n"
                "BLNE    sub_FFC0C098\n"
                "LDRB    R0, [SP,#0x34]\n"
                "MOV     R3, R8\n"
                "MOV     R2, #0x14\n"
                "AND     R1, R0, #0xFF\n"
                "ADD     R0, SP, #0x30\n"
                "STR     R7, [SP]\n"
                "BL      sub_FFCE6924\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x156\n"
                "BNE     loc_FFC4DD04\n"
                "LDR     R0, =0x1926C\n"
                "LDR     R1, [SP,#0x30]\n"
                "MOV     R2, #0x10\n"
                "BL      sub_FFCDCDE8\n"
                "TST     R0, #1\n"
                "BEQ     loc_FFC4DD14\n"
                "LDR     R1, =0x15E\n"
"loc_FFC4DD04:\n"
                "LDR     R0, =0xFFC4DF7C\n"
                "BL      sub_FFC0C098\n"
"loc_FFC4DD0C:\n"
                "ADD     SP, SP, #0x38\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC4DD14:\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x30\n"
                "MOV     R1, #0x2B\n"
                "BL      sub_FFC5A0DC\n"
                "BL      sub_FFC674DC\n"
                "LDRSB   R1, [SP,#0x34]\n"
                "CMP     R0, R1\n"
                "MOVEQ   R7, #0\n"
                "BEQ     loc_FFC4DD68\n"
                "LDR     R5, =0x1926C\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC67658\n"
                "MOV     R8, R0\n"
                "BL      sub_FFC959E4\n"
                "CMP     R8, R0\n"
                "MOV     R7, R0\n"
                "LDRLS   R1, =0x16B\n"
                "LDRLS   R0, =0xFFC4DF7C\n"
                "BLLS    sub_FFC0C098\n"
                "SUB     R7, R8, R7\n"
"loc_FFC4DD68:\n"
                "BL      sub_FFC49C20_my\n"   //----------------------->
                "LDR     R0, =0x19290\n"
                "LDRH    R3, [R0,#0x46]\n"
                "LDRH    R2, [R0,#0x44]\n"
                "LDR     R1, [R0,#0x40]\n"
                "LDR     R0, [R0,#0x3C]\n"
                "BL      sub_FFC48CA0\n"
                "MOV     R3, #0\n"
                "LDR     R2, =0xFFC4DAF0\n"
                "MOV     R1, #0\n"
                "LDR     R0, =0xFFC4DB04\n"
                "ADD     R8, SP, #0xC\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R2, =0xFFC4DB14\n"
                "LDR     R1, =0xFFC4DB00\n"
                "STMEA   SP, {R1-R3}\n"
                "LDR     R1, [R4,#4]\n"
                "MOV     R3, R6\n"
                "MOV     R2, R7\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC48FFC\n"
                "LDR     R0, [R4,#0xC]\n"
                "MOV     R1, #0x20\n"
                "BL      sub_FFC18DEC\n"
                "B       loc_FFC4DD0C\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFC49C20_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R9,LR}\n"
                "LDR     R5, =0x5538\n"
                "MOV     R6, #0\n"
                "STR     R6, [R5,#0x20]\n"
                "LDR     R0, [R5,#4]\n"
                "LDR     R8, =0x2710\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC49CD8\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#4]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BF14\n"
                "STR     R0, [R5,#0x10]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BF14\n"
                "STR     R0, [R5,#0x14]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BECC\n"
                "STR     R0, [R5,#0x18]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BECC\n"
                "LDR     R7, =0x18E70\n"
                "MOV     R4, #9\n"
                "ADD     R9, R4, #0x2D4\n"
                "STR     R0, [R5,#0x1C]\n"
"loc_FFC49C94:\n"
                "RSB     R0, R4, R4,LSL#3\n"
                "STR     R6, [R7,R0,LSL#2]\n"
                "ADD     R1, R7, R0,LSL#2\n"
                "STR     R9, [SP]\n"
                "LDR     R0, [R5,#0x1C]\n"
                "LDR     R3, =0xFFC48F9C\n"
                "MOV     R2, R8\n"
                "BL      sub_FFC0BFD8\n"
                "SUBS    R4, R4, #1\n"
                "BPL     loc_FFC49C94\n"
                "MOV     R3, #0\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =MovieRecord_Task_my\n"    // ----------------->
                "MOV     R2, #0x1000\n"
                "MOV     R1, #0x14\n"
                "LDR     R0, =0xFFC49E28\n"    // "Movierecord"
                "BL      sub_FFC0BE98\n"
"loc_FFC49CD8:\n"
                "BL      sub_FFD071E4\n"
                "BL      sub_FFC49D3C\n"
                "MOV     R1, R0\n"
                "MOV     R0, #0xB\n"
                "ADD     R3, R0, #0x2DC\n"
                "STR     R0, [R1]\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =0xFFC48F9C\n"
                "MOV     R2, R8\n"
                "LDR     R0, [R5,#0x18]\n"
                "BL      sub_FFC0BFD8\n"
                "LDMFD   SP!, {R3-R9,PC}\n"
 );
} 


void __attribute__((naked,noinline)) MovieRecord_Task_my(){ 
 asm volatile(
                "STMFD   SP!, {R2-R8,LR}\n"
                "LDR     R8, =0x32B\n"
                "LDR     R7, =0x2710\n"
                "LDR     R4, =0x5538\n"
                "MOV     R6, #0\n"
                "MOV     R5, #1\n"
"loc_FFC49B30:\n"
                "LDR     R0, [R4,#0x18]\n"
                "MOV     R2, #0\n"
                "ADD     R1, SP, #4\n"
                "BL      sub_FFC19070\n"
                "LDR     R0, [R4,#0x20]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC49C00\n"
                "LDR     R0, [SP,#4]\n"
                "LDR     R1, [R0]\n"
                "SUB     R1, R1, #2\n"
                "CMP     R1, #9\n"
                "ADDLS   PC, PC, R1,LSL#2\n"
                "B       loc_FFC49C00\n"
"loc_FFC49B64:\n"
                "B       loc_FFC49BB4\n"
"loc_FFC49B68:\n"
                "B       loc_FFC49BD4\n"
"loc_FFC49B6C:\n"
                "B       loc_FFC49BE4\n"
"loc_FFC49B70:\n"
                "B       loc_FFC49BEC\n"
"loc_FFC49B74:\n"
                "B       loc_FFC49BBC\n"
"loc_FFC49B78:\n"
                "B       loc_FFC49BF4\n"
"loc_FFC49B7C:\n"
                "B       loc_FFC49BC4\n"
"loc_FFC49B80:\n"
                "B       loc_FFC49C00\n"
"loc_FFC49B84:\n"
                "B       loc_FFC49BFC\n"
"loc_FFC49B88:\n"
                "B       loc_FFC49B8C\n"
"loc_FFC49B8C:\n"
                "LDR     R0, =0xFFC49814\n"
                "STR     R6, [R4,#0x34]\n"
                "STR     R0, [R4,#0xA0]\n"
                "LDR     R0, =0xFFC4928C\n"
                "LDR     R2, =0xFFC491A8\n"
                "LDR     R1, =0x18F98\n"
                "STR     R6, [R4,#0x24]\n"
                "BL      sub_FFC2B58C\n"
                "STR     R5, [R4,#0x38]\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BB4:\n"
                "BL      unlock_optical_zoom\n" //  +
                "BL      sub_FFC4990C\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BBC:\n"
                "BL      sub_FFC49614_my\n"  //------------------->
                "B       loc_FFC49C00\n"
"loc_FFC49BC4:\n"
                "LDR     R1, [R0,#0x10]\n"
                "LDR     R0, [R0,#4]\n"
                "BL      sub_FFD07DF0\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BD4:\n"
                "LDR     R0, [R4,#0x38]\n"
                "CMP     R0, #5\n"
                "STRNE   R5, [R4,#0x28]\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BE4:\n"
                "BL      sub_FFC4941C\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BEC:\n"
                "BL      sub_FFC492D8\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BF4:\n"
                "BL      sub_FFC49134\n"
                "B       loc_FFC49C00\n"
"loc_FFC49BFC:\n"
                "BL      sub_FFC49D68\n"
"loc_FFC49C00:\n"
                "LDR     R1, [SP,#4]\n"
                "LDR     R3, =0xFFC48F9C\n"
                "STR     R6, [R1]\n"
                "STR     R8, [SP]\n"
                "LDR     R0, [R4,#0x1C]\n"
                "MOV     R2, R7\n"
                "BL      sub_FFC0BFD8\n"
                "B       loc_FFC49B30\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFC49614_my(){ 
 asm volatile(                                   	
                "STMFD   SP!, {R4-R8,LR}\n"
                "SUB     SP, SP, #0x40\n"
                "MOV     R6, #0\n"
                "LDR     R5, =0x5538\n"
                "MOV     R4, R0\n"
                "STR     R6, [SP,#0x30]\n"
                "STR     R6, [SP,#0x28]\n"
                "LDR     R0, [R5,#0x38]\n"
                "MOV     R8, #4\n"
                "CMP     R0, #3\n"
                "STREQ   R8, [R5,#0x38]\n"
                "LDR     R0, [R5,#0xA0]\n"
          //    "BLX     R0\n"                   
                ".long   0xE12FFF30\n"
                "LDR     R0, [R5,#0x38]\n"
                "CMP     R0, #4\n"
                "BNE     loc_FFC496EC\n"
                "ADD     R3, SP, #0x28\n"
                "ADD     R2, SP, #0x2C\n"
                "ADD     R1, SP, #0x30\n"
                "ADD     R0, SP, #0x34\n"
                "BL      sub_FFD07F84\n"
                "CMP     R0, #0\n"
                "MOV     R7, #1\n"
                "BNE     loc_FFC49690\n"
                "LDR     R1, [R5,#0x28]\n"
                "CMP     R1, #1\n"
                "BNE     loc_FFC496F4\n"
                "LDR     R1, [R5,#0x50]\n"
                "LDR     R2, [R5,#0x3C]\n"
                "CMP     R1, R2\n"
                "BCC     loc_FFC496F4\n"
"loc_FFC49690:\n"
                "CMP     R0, #0x80000001\n"
                "STREQ   R8, [R5,#0x54]\n"
                "BEQ     loc_FFC496C8\n"
                "CMP     R0, #0x80000003\n"
                "STREQ   R7, [R5,#0x54]\n"
                "BEQ     loc_FFC496C8\n"
                "CMP     R0, #0x80000005\n"
                "MOVEQ   R0, #2\n"
                "BEQ     loc_FFC496C4\n"
                "CMP     R0, #0x80000007\n"
                "STRNE   R6, [R5,#0x54]\n"
                "BNE     loc_FFC496C8\n"
                "MOV     R0, #3\n"
"loc_FFC496C4:\n"
                "STR     R0, [R5,#0x54]\n"
"loc_FFC496C8:\n"
                "LDR     R0, =0x18FC8\n"
                "LDR     R0, [R0,#8]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC496E0\n"
                "BL      sub_FFC38054\n"
                "B       loc_FFC496E4\n"
"loc_FFC496E0:\n"
                "BL      sub_FFC49134\n"
"loc_FFC496E4:\n"
                "MOV     R0, #5\n"
                "STR     R0, [R5,#0x38]\n"
"loc_FFC496EC:\n"
                "ADD     SP, SP, #0x40\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC496F4:\n"
                "LDR     LR, [SP,#0x30]\n"
                "CMP     LR, #0\n"
                "BEQ     loc_FFC497BC\n"
                "STR     R7, [R5,#0x2C]\n"
                "LDR     R0, [R5,#0x6C]\n"
                "LDR     R1, [R4,#0x14]\n"
                "LDR     R2, [R4,#0x18]\n"
                "LDR     R12, [R4,#0xC]\n"
                "ADD     R3, SP, #0x38\n"
                "ADD     R8, SP, #0x14\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R3, [R5,#0x58]\n"
                "ADD     R2, SP, #0x3C\n"
                "ADD     R8, SP, #8\n"
            //  "LDRD    R0, [SP,#0x28]\n"      
                ".long   0xE1CD02D8\n"
                "STMIA   R8, {R0,R2,R3}\n"
                "STR     R1, [SP,#4]\n"
                "STR     LR, [SP]\n"
                "LDMIB   R4, {R0,R1}\n"
                "LDR     R3, [SP,#0x34]\n"
                "MOV     R2, R12\n"
                "BL      sub_FFCCD308\n"
                "LDR     R0, [R5,#0x10]\n"
                "MOV     R1, #0x3E8\n"
                "BL      sub_FFC0BA5C\n"
                "CMP     R0, #9\n"
                "BNE     loc_FFC49770\n"
                "BL      sub_FFD08560\n"
                "MOV     R0, #0x90000\n"
                "STR     R7, [R5,#0x38]\n"
                "B       loc_FFC49788\n"
"loc_FFC49770:\n"
                "LDR     R0, [SP,#0x38]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC49790\n"
                "BL      sub_FFD08560\n"
                "MOV     R0, #0xA0000\n"
                "STR     R7, [R5,#0x38]\n"
"loc_FFC49788:\n"
                "BL      sub_FFC5C1F8\n"
                "B       loc_FFC496EC\n"
"loc_FFC49790:\n"
                "BL      sub_FFCCD3CC\n"
                "LDR     R0, [SP,#0x34]\n"
                "LDR     R1, [SP,#0x3C]\n"
                "BL      sub_FFD08308\n"
                "LDR     R0, [R5,#0x4C]\n"
                "LDR     R1, =0x55A4\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x4C]\n"
                "LDR     R0, [SP,#0x3C]\n"
                "MOV     R2, #0\n"
                "BL      sub_FFD06188_my\n"  //----------------->
"loc_FFC497BC:\n"
                "LDR     R0, [R5,#0x50]\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x50]\n"
                "LDR     R1, [R5,#0x78]\n"
                "MUL     R0, R1, R0\n"
                "LDR     R1, [R5,#0x74]\n"
                "BL      sub_FFE3CED0\n"
                "MOV     R4, R0\n"
                "BL      sub_FFD08598\n"
                "LDR     R1, [R5,#0x70]\n"
                "CMP     R1, R4\n"
                "BNE     loc_FFC497F8\n"
                "LDR     R0, [R5,#0x30]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC4980C\n"
"loc_FFC497F8:\n"
                "LDR     R1, [R5,#0x84]\n"
                "MOV     R0, R4\n"

           //   "BLX     R1\n"                  
                ".long   0xE12FFF31\n"

                "STR     R4, [R5,#0x70]\n"
                "STR     R6, [R5,#0x30]\n"
"loc_FFC4980C:\n"
                "STR     R6, [R5,#0x2C]\n"
                "B       loc_FFC496EC\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFD06188_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "LDR     R4, =0x9E48\n"
                "LDR     LR, [R4]\n"
                "LDR     R2, [R4,#8]\n"
                "CMP     LR, #0\n"
                "LDRNE   R3, [R4,#0xC]\n"
                "MOV     R5, R2\n"
                "CMPNE   R3, #1\n"
                "MOVEQ   R2, #0\n"
                "STREQ   R0, [R4]\n"
                "STREQ   R2, [R4,#0xC]\n"
                "BEQ     loc_FFD06254\n"
                "LDR     R3, [R4,#4]\n"
                "LDR     R7, =table\n"          // *
                "ADD     R12, R3, R3,LSL#1\n"
                "LDR     R3, [R7,R12,LSL#2]\n"
                "ADD     R6, R7, #0x30\n"
                "LDR     R8, [R6,R12,LSL#2]\n"
                "SUB     R3, LR, R3\n"
                "CMP     R3, #0\n"
                "SUB     LR, LR, R8\n"
                "BLE     loc_FFD06210\n"
                "ADD     R12, R7, R12,LSL#2\n"
                "LDR     LR, [R12,#4]\n"
                "CMP     LR, R3\n"
                "ADDGE   R2, R2, #1\n"
                "BGE     loc_FFD06204\n"
                "LDR     R12, [R12,#8]\n"
                "CMP     R12, R3\n"
                "ADDLT   R2, R2, #3\n"
                "ADDGE   R2, R2, #2\n"
"loc_FFD06204:\n"
    //          "CMP     R2, #0x17\n"   // -
    //          "MOVGE   R2, #0x16\n"   // -
                "CMP     R2, #0x1A\n"   // +
                "MOVGE   R2, #0x19\n"   // +
                "B       loc_FFD06244\n"
"loc_FFD06210:\n"
                "CMP     LR, #0\n"
                "BGE     loc_FFD06244\n"
                "ADD     R3, R6, R12,LSL#2\n"
                "LDR     R12, [R3,#4]\n"
                "CMP     R12, LR\n"
                "SUBLE   R2, R2, #1\n"
                "BLE     loc_FFD0623C\n"
                "LDR     R3, [R3,#8]\n"
                "CMP     R3, LR\n"
                "SUBGT   R2, R2, #3\n"
                "SUBLE   R2, R2, #2\n"
"loc_FFD0623C:\n"
                "CMP     R2, #0\n"
                "MOVLT   R2, #0\n"
"loc_FFD06244:\n"
                "CMP     R2, R5\n"
                "STRNE   R2, [R4,#8]\n"
                "MOVNE   R2, #1\n"
                "STRNE   R2, [R4,#0xC]\n"
"loc_FFD06254:\n"
                "LDR     R2, =CompressionRateTable\n"   // *
                "LDR     R3, [R4,#8]\n"
                "LDR     R2, [R2,R3,LSL#2]\n"

                "LDR     R3, =video_mode\n"      // +
                "LDR     R3, [R3]\n"             // +
                "LDR     R3, [R3]\n"             // +
                "CMP     R3, #1\n"               // +
                "LDREQ   R3, =video_quality\n"   // +     
                "LDREQ   R3, [R3]\n"             // +     
                "LDREQ   R2, [R3]\n"             // +     

                "STR     R2, [R1]\n"
                "STR     R0, [R4]\n"
                "BL      mute_on_zoom\n"     // +
                "LDMFD   SP!, {R4-R8,PC}\n"
 );
} 

#include "conf.h"

int *video_quality = &conf.video_quality;
int *video_mode    = &conf.video_mode;

long def_table[24]={0x2000, 0x38D, 0x788, 0x5800, 0x9C5, 0x14B8, 0x10000, 0x1C6A, 0x3C45, 0x8000, 0xE35, 0x1E23,
           0x1CCD, -0x2E1, -0x579, 0x4F33, -0x7EB, -0xF0C, 0xE666, -0x170A, -0x2BC6, 0x7333, -0xB85, -0x15E3};

long table[24];

void change_video_tables(int a, int b){
 int i;
 for (i=0;i<24;i++) table[i]=(def_table[i]*a)/b; 
}

long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};
